package com.leyou.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leyou.item.dto.CategoryDTO;
import com.leyou.item.entity.Category;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CategoryMapper extends BaseMapper<Category> {
    @Select("SELECT *\n" +
            "FROM tb_category tbc, tb_category_brand tbcb\n" +
            "WHERE tbc.id = tbcb.category_id AND tbcb.brand_id=#{bid}")
    List<CategoryDTO> queryCategoryByBid(Long bid);
}
